// 自定义画家类，用于绘制随机图形
import 'package:flutter/cupertino.dart';

import 'Shape/RandomShape.dart';

class RandomShapesPainter extends CustomPainter {
  List<RandomShape> shapes;

  RandomShapesPainter(this.shapes);

  @override
  void paint(Canvas canvas, Size size) {
    for (var shape in shapes) {
      shape.draw(canvas, size);
    }
  }

  @override
  bool shouldRepaint(covariant RandomShapesPainter oldDelegate) {
    return true;
  }
}